#!/usr/bin/python3
def factorial(x):
    if x == 0:
        return 1
    else:
        return x*factorial(x-1)
while True:
    x=input("Please input a positive integer:")
    try:
        x=int(x)
        if x >= 0:
            break
    except:
        pass

print(f"The factorial of {x} is:",factorial(x))
